#include "banquinholucaseduardo.h"

#include "gllib/Objects.h"

#include <GL/glu.h>


void BanquinhoLucaseduardo::draw() {


    //OBS: POR OPERAÇOES DE ESCALA OU TRANSLATE ANTESA DO PUSH MATRIX

    glScalef(1.0,1.5,1.0);

    glPushMatrix();



    //acento do banco

    glTranslatef(0.0,0.46,0.0);
    glScalef(1.2,0.18,1.2);
    glColor3f(0.4,0.0,0.0);
    gllibSphere(0.2,10);


    glPopMatrix();
    glPushMatrix();

    //retangulo preto 1

    glTranslatef(0.0,0.15,0.11);
    glScalef(2.8,1.0,1.0);

    glColor3f(0.1,0.1,0.1);
    gllibCube(0.06);

    glPopMatrix();
    glPushMatrix();

     //retangulo preto 2
    glRotatef(90,0.0,1.0,0.0);
    glTranslatef(0.0,0.15,0.11);
    glScalef(2.8,1.0,1.0);

    glColor3f(0.1,0.1,0.1);
    gllibCube(0.06);

    glPopMatrix();
    glPushMatrix();


   //retangulo preto 3

    glRotatef(180,0.0,1.0,0.0);
    glTranslatef(0.0,0.15,0.11);
    glScalef(2.8,1.0,1.0);

    glColor3f(0.1,0.1,0.1);
    gllibCube(0.06);

    glPopMatrix();
    glPushMatrix();

//retangulo preto 4

    glRotatef(270,0.0,1.0,0.0);
    glTranslatef(0.0,0.15,0.11);
    glScalef(2.8,1.0,1.0);

    glColor3f(0.1,0.1,0.1);
    gllibCube(0.06);

    glPopMatrix();
    glPushMatrix();


        // perna 1 do banco

    glTranslatef(0.11,0.23,0.11);
    glScalef(1.0,7.8,1.0);
    glColor3f(0.6,0.4,0.2);


    gllibCube(0.06);

    // perna 2 do banco

    glPopMatrix();
    glPushMatrix();

    glRotatef(90,0.0,1.0,0.0);
    glTranslatef(0.11,0.23,0.11);
    glScalef(1.0,7.8,1.0);
    glColor3f(0.6,0.4,0.2);

    gllibCube(0.06);

    // perna 3 do banco
    glPopMatrix();
    glPushMatrix();

    glRotatef(180,0.0,1.0,0.0);
    glTranslatef(0.11,0.23,0.11);
    glScalef(1.0,7.8,1.0);
    glColor3f(0.6,0.4,0.2);

    gllibCube(0.06);


    // perna 4 do banco

    glPopMatrix();
    glPushMatrix();

    glRotatef(-90,0.0,1.0,0.0);
    glTranslatef(0.11,0.23,0.11);
    glScalef(1.0,7.8,1.0);
    glColor3f(0.6,0.4,0.2);

    gllibCube(0.06);

    glPopMatrix();


}
